Skip to content

Inherited components are obstacles - #12

Merged
JKRT merged 2 commits into
masterfrom
inherited-obstacles
Nov 16, 2026
Merged

JKRT merged 2 commits into
masterfrom
inherited-obstacles

Conversation

@JKRT

@JKRT JKRT commented Nov 13, 2026

Copy link
Copy Markdown
Member

A new component could land on an inherited one: in 0.1.1 an inherited component was a node only when a connect of the class named it.

  • Every inherited component with a place is a fixed node: placement and routing keep clear of it.
  • The new components go beside the inherited ones as a block, on the side (right, below, left, above) where the lines to them are shortest; right when there are none. Inherited connectors do not move the block, so parts inside extends TwoPin stay between p and n. --keep is unchanged.
  • The report counts the class's own components only ("2 of 2", was "2 of 3").
  • Tests: test/models/Inheritance.mo, 4 classes laid out without their base: new parts connected to an inherited one, not connected, two levels of extends, inherited border pins. Features.Derived re-blessed: its parts follow Base's gain in a row instead of sitting on Base's source. 61 tests pass; fmt and clippy clean.
  • MSL 4.1.0, 1172 classes, each result read back with --keep: overlaps with inherited components 151 with 0.1.1, 0 with this; none among own components and no line through a component in either. Time 1.6 s → 1.7 s.

A connection to an inherited component whose base class has no Placement still gets no line (warning); the base needs a layout first.

JKRT added 2 commits November 13, 2026 12:23
Every inherited component with a place is a fixed node, not only the
connected ones. New components go beside them as a block, on the side
where the lines to them are shortest; lines are routed around them.
The report counts only the class's own components.

MSL 4.1.0, all classes: overlaps with inherited components 151 -> 0.

Assisted-by: Claude Opus 5.5
Rust 1.100.0 (stable since 2026-11-12) flags 3 loops over token indices.

Assisted-by: Claude Opus 5.5
@JKRT
JKRT merged commit 5867b2d into master Nov 16, 2026
2 checks passed
@JKRT
JKRT deleted the inherited-obstacles branch November 16, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant